package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the PERSONA database table.
 * 
 */
@Entity
@Table(name="PERSONA")
public class Persona implements Serializable {
	private static final long serialVersionUID = 1L;
	private long personaId;
	private String anexo;
	private String email;
	private String fax;
	private String fgDel;
	private String numDocIden;
	private String telef;
	private String tpoPers;
	private Set<CuentaJuri> cuentaJuris;
	private Direccion direccion;
	private TmJurisdiccion tmJurisdiccion;
	private TmDocIden tmDocIden;
	private RegisPublico regisPublico;
	private Set<PeJuri> peJuris;
	private Set<PeNatu> peNatus;

    public Persona() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="PERSONA_ID", unique=true, nullable=false)
	public long getPersonaId() {
		return this.personaId;
	}

	public void setPersonaId(long personaId) {
		this.personaId = personaId;
	}


	@Column(length=10)
	public String getAnexo() {
		return this.anexo;
	}

	public void setAnexo(String anexo) {
		this.anexo = anexo;
	}


	@Column(nullable=false, length=40)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}


	@Column(length=30)
	public String getFax() {
		return this.fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}


	@Column(name="FG_DEL", length=1)
	public String getFgDel() {
		return this.fgDel;
	}

	public void setFgDel(String fgDel) {
		this.fgDel = fgDel;
	}


	@Column(name="NUM_DOC_IDEN", nullable=false, length=15)
	public String getNumDocIden() {
		return this.numDocIden;
	}

	public void setNumDocIden(String numDocIden) {
		this.numDocIden = numDocIden;
	}


	@Column(length=30)
	public String getTelef() {
		return this.telef;
	}

	public void setTelef(String telef) {
		this.telef = telef;
	}


	@Column(name="TPO_PERS", nullable=false, length=1)
	public String getTpoPers() {
		return this.tpoPers;
	}

	public void setTpoPers(String tpoPers) {
		this.tpoPers = tpoPers;
	}


	//bi-directional many-to-one association to CuentaJuri
	@OneToMany(mappedBy="persona")
	public Set<CuentaJuri> getCuentaJuris() {
		return this.cuentaJuris;
	}

	public void setCuentaJuris(Set<CuentaJuri> cuentaJuris) {
		this.cuentaJuris = cuentaJuris;
	}
	

	//bi-directional one-to-one association to Direccion
	@OneToOne(mappedBy="persona")
	public Direccion getDireccion() {
		return this.direccion;
	}

	public void setDireccion(Direccion direccion) {
		this.direccion = direccion;
	}
	

	//bi-directional many-to-one association to TmJurisdiccion
    @ManyToOne
	@JoinColumn(name="JURIS_ID", nullable=false)
	public TmJurisdiccion getTmJurisdiccion() {
		return this.tmJurisdiccion;
	}

	public void setTmJurisdiccion(TmJurisdiccion tmJurisdiccion) {
		this.tmJurisdiccion = tmJurisdiccion;
	}
	

	//bi-directional many-to-one association to TmDocIden
    @ManyToOne
	@JoinColumn(name="TIPO_DOC_ID", nullable=false)
	public TmDocIden getTmDocIden() {
		return this.tmDocIden;
	}

	public void setTmDocIden(TmDocIden tmDocIden) {
		this.tmDocIden = tmDocIden;
	}
	

	//bi-directional many-to-one association to RegisPublico
    @ManyToOne
	@JoinColumn(name="REG_PUB_ID")
	public RegisPublico getRegisPublico() {
		return this.regisPublico;
	}

	public void setRegisPublico(RegisPublico regisPublico) {
		this.regisPublico = regisPublico;
	}
	

	//bi-directional many-to-one association to PeJuri
	@OneToMany(mappedBy="persona")
	public Set<PeJuri> getPeJuris() {
		return this.peJuris;
	}

	public void setPeJuris(Set<PeJuri> peJuris) {
		this.peJuris = peJuris;
	}
	

	//bi-directional many-to-one association to PeNatu
	@OneToMany(mappedBy="persona")
	public Set<PeNatu> getPeNatus() {
		return this.peNatus;
	}

	public void setPeNatus(Set<PeNatu> peNatus) {
		this.peNatus = peNatus;
	}
	
}